//
//  UIButton+DVPosition.h
//  DoctorVideo
//
//  Created by 牛清旭 on 2019/8/3.
//  Copyright © 2019 lzx. All rights reserved.
//

#import <UIKit/UIKit.h>
// 定义一个枚举（包含了四种类型的button）
typedef NS_ENUM(NSUInteger, DVButtonEdgeInsetsStyle) {
    DVButtonEdgeInsetsStyleTop, // image在上，label在下
    DVButtonEdgeInsetsStyleLeft, // image在左，label在右
    DVButtonEdgeInsetsStyleBottom, // image在下，label在上
    DVButtonEdgeInsetsStyleRight // image在右，label在左
};
typedef NS_ENUM(NSUInteger, DVButtonTitleStyle) {
    DVButtonTitleStyleTop, // image在上，label在下
    DVButtonTitleStyleLeft, // image在左，label在右
    DVButtonTitleStyleBottom, // image在下，label在上
    DVButtonTitleStyleRight // image在右，label在左
};
@interface UIButton (DVPosition)
/**
 *  设置button的titleLabel和imageView的布局样式，及间距
 *
 *  @param style titleLabel和imageView的布局样式
 *  @param space titleLabel和imageView的间距
 */
- (void)layoutButtonWithEdgeInsetsStyle:(DVButtonEdgeInsetsStyle)style
                        imageTitleSpace:(CGFloat)space;

- (void)layoutButtonWithTitleStyle:(DVButtonTitleStyle)style
                             space:(UIEdgeInsets)space;
@end
